package com.heima.wemedia.thread;

import com.baomidou.mybatisplus.extension.api.R;
import com.heima.model.wemedia.pojos.WmUser;

public class UserThreadLocal {

    //ThreadLocal类型的静态方法
    public static ThreadLocal<WmUser> threadLocal=new ThreadLocal<>();
    //变量相对应set和get方法
    public static WmUser get(){
        return threadLocal.get();
    }
    public static void set(WmUser wmUser){
         threadLocal.set(wmUser);
    }

    //变量相对应remove方法
    public static void remove(){
        threadLocal.remove();
    }
}
